package com.wangxinyuchuan.demo.strategy;

import com.wangxinyuchuan.demo.factory.HandlerFactory;
import com.wangxinyuchuan.demo.template.AbstractHandler;
import com.wangxinyuchuan.demo.template.AbstractHandler2;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class PersonHandler2 extends AbstractHandler2 {



    @PostConstruct
    public void init() {
        HandlerFactory.register2("person2", this);
    }

    @Override
    public void AA(String nickName) {
        System.out.println("PersonHandler---AA：" + nickName);
    }

    @Override
    public void BB(String nickName) {
        System.out.println("PersonHandler---BB：" + nickName);
    }
}
